define count
proc (L)
  i := 0;
  while nullp(L) do 
    e := car(L);
    if intp(e) then
      i := i + 1; 
    else
      i := i + count(e)
    end
    L = cdr(L); 
  od;
  return := i
end;
a := [1,[2,3,[4,[],5],6],7,8];
b := count(a)
